package com.ruoyi.back.controller

import com.ruoyi.app.common.Data
import com.ruoyi.back.domain.ClubJobSetting
import com.ruoyi.back.service.ClubJobSettingService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("system/clubJobSetting")
@Api(tags = ["系统设置-社友乐园-设置"])
class ClubJobSettingController {

    @Autowired
    private lateinit var clubJobSettingService: ClubJobSettingService


    @ApiOperation("获取当前社友乐园设置项")
    @GetMapping("get")
    fun clubJobSetting(): Data<ClubJobSetting> = clubJobSettingService.clubJobSetting()

    @ApiOperation("保存社友乐园设置项")
    @PostMapping("save")
    fun saveClubJobSetting(@RequestBody clubJobSetting: ClubJobSetting): Data<Boolean> = clubJobSettingService.saveClubJobSetting(clubJobSetting)
}